import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
  {
    path: '/register',
    name: 'register',
    component: () => import('@/views/register/register'),
    meta: {
      title: '注册'
    }
  },
  {
    path: '/download/:brandId',
    name: 'download',
    component: () => import('@/views/register/download'),
    meta: {
      title: '下载'
    }
  },
  {
    path: '/agreement',
    name: 'agreement',
    component: () => import('@/views/user/agreement'),
    meta: {
      title: '用户协议'
    }
  },
  {
    path: '/privacy',
    name: 'privacy',
    component: () => import('@/views/user/privacy'),
    meta: {
      title: '用户隐私协议'
    }
  },
  {
    path: '/userPrivacy',
    name: 'userPrivacy',
    component: () => import('@/views/user/userPrivacy'),
    meta: {
      title: '用户隐私协议'
    }
  },
  {
    path: '/search',
    name: 'search',
    component: () => import('@/views/reports/search'),
    meta: {
      title: '查询报告'
    }
  },
  {
    path: '/reportBill',
    name: 'reportBill',
    component: () => import('@/views/reports/bill'),
    meta: {
      title: '查询记录'
    }
  },
  {
    path: '/searchAgr',
    name: 'searchAgr',
    component: () => import('@/views/user/searchAgr'),
    meta: {
      title: '用户使用协议'
    }
  },
  {
    path: '/searchPay',
    name: 'searchPay',
    component: () => import('@/views/reports/searchPay'),
    meta: {
      title: '查询报告支付'
    }
  },
  {
    path: '/selPro',
    name: 'selPro',
    component: () => import('@/views/reports/selPro'),
    meta: {
      title: '选择模式'
    }
  },
  {
    path: '/applyCard',
    name: 'applyCard',
    component: () => import('@/views/applyCard/applyCard'),
    meta: {
      title: '地推任务'
    }
  },
  {
    path: '/applyCardDetail/:item',
    name: 'applyCardDetail',
    component: () => import('@/views/applyCard/applyCardDetail'),
    meta: {
      title: '地推任务'
    }
  },
  {
    path: '/applyCardDetailParams',
    name: 'applyCardDetailParams',
    component: () => import('@/views/applyCard/applyCardDetailParams'),
    meta: {
      title: '地推任务'
    }
  },
  {
    path: '/authorization',
    name: 'authorization',
    component: () => import('@/views/user/authorization'),
    meta: {
      title: '授权书'
    }
  },
  {
    path: '/telRecharge',
    name: 'telRecharge',
    component: () => import('@/views/telRecharge/telRecharge'),
    meta: {
      title: '话费充值'
    }
  },
  {
    path: '/transfer',
    name: 'transfer',
    component: () => import('@/pages/links/Transfer'),
    meta: {
      title: '正在授权'
    }
  },
  {
    path: '/getCode',
    name: 'getCode',
    component: () => import('@/pages/links/getCode'),
    meta: {
      title: '正在授权'
    }
  },
  {
    path: '/',
    name: 'home',
    component: () => import('@/pages/home'),
    meta: {
      title: '首页'
    }
  },
  {
    path: '/lifePayCost',
    name: 'lifePayCost',
    component: () => import('@/pages/lifePayCost'),
    meta: {
      title: '生活缴费'
    }
  },
  {
    path: '/telephoneCharge/:edition',
    name: 'telephoneCharge',
    component: () => import('@/pages/lifePayCost/telephoneCharge'),
    meta: {
      title: '话费充值'
    }
  },
  {
    path: '/electricityCharge/:edition',
    name: 'electricityCharge',
    component: () => import('@/pages/lifePayCost/electricityCharge'),
    meta: {
      title: '电费充值'
    }
  },
  {
    path: '/tiktokCurrency/:edition',
    name: 'tiktokCurrency',
    component: () => import('@/pages/lifePayCost/tiktokCurrency'),
    meta: {
      title: '抖币充值'
    }
  },
  {
    path: '/cardCoupon',
    name: 'cardCoupon',
    component: () => import('@/pages/lifePayCost/cardCoupon/cardCoupon'),
    meta: {
      title: '会员卡券'
    }
  },
  {
    path: '/cardCouponDetail/:item',
    name: 'cardCouponDetail',
    component: () => import('@/pages/lifePayCost/cardCoupon/cardCouponDetail'),
    meta: {
      title: '卡券详情'
    }
  },
  {
    path: '/gathering/:title/:money/:url',
    name: 'gathering',
    component: () => import('@/pages/links/gathering'),
    meta: {
      title: '支付'
    }
  },
  {
    path: '/lifePayCostBillBefore/:orderType',
    name: 'lifePayCostBillBefore',
    component: () => import('@/pages/lifePayCost/lifePayCostBillBefore'),
    meta: {
      title: '查询记录'
    }
  },
  {
    path: '/lifePayCostBill/:orderType/:account',
    name: 'lifePayCostBill',
    component: () => import('@/pages/lifePayCost/lifePayCostBill'),
    meta: {
      title: '查询记录'
    }
  },
  {
    path: '/lifePayCostBillDetail/:order',
    name: 'lifePayCostBillDetail',
    component: () => import('@/pages/lifePayCost/lifePayCostBillDetail'),
    meta: {
      title: '订单详情'
    }
  },
  {
    path: '/customerService',
    name: 'customerService',
    component: () => import('@/pages/customerService'),
    meta: {
      title: '客服'
    }
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
